package com.aeye.mbr.upms.dao.model;


import com.aeye.mbr.upms.common.constant.SmsDatabaseConstants;
import com.gitee.sunchenbin.mybatis.actable.annotation.DBColumn;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by chengshengru on 17-7-5.
 */
@Table(name = SmsDatabaseConstants.TABLE_SMS_TEMPLATE)
public class SmsTemplate implements Serializable {


    public static final int ENABLE = 0;

    private static final int DISABLED = 1;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "SNOWFLAKE")
    @DBColumn(type = MySqlTypeConstant.BIGINT,length = 21,isKey = true)
    private Long id;


    /**
     * 模板名称
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String name;
    /**
     * 三方平台模板ID
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String templateId;

    /**
     * 模板类型
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String templateType;

    /**
     * SmsConfig#id
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 20)
    private Long smsConfigId;
    /**
     * 签名
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String signName;
    /**
     * 模板内容(仅用来查看)
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 256)
    private String content;

    /**
     * 是否禁用
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 2)
    private Integer disabled;
    /**
     * 顶级组织ID
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 4)
    private Integer topOrgId;







    /**
     * 创建者
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 11)
    private Integer createUser;


    /**
     * 更新者
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 11)
    private Integer updateUser;
    /**
     * 创建时间
     */
    @DBColumn(type = MySqlTypeConstant.DATETIME)
    private Date createTime;


    /**
     * 更新时间
     */
    @DBColumn(type = MySqlTypeConstant.DATETIME)
    private Date updateTime;


    /**
     * 有效时间
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 11)
    private Integer expireTime;

    @DBColumn(type = MySqlTypeConstant.INT,length = 11)
    private Integer maxCount;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getTopOrgId() {
        return topOrgId;
    }

    public void setTopOrgId(Integer topOrgId) {
        this.topOrgId = topOrgId;
    }

    public Long getSmsConfigId() {
        return smsConfigId;
    }

    public void setSmsConfigId(Long smsConfigId) {
        this.smsConfigId = smsConfigId;
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getTemplateType() {
        return templateType;
    }

    public void setTemplateType(String templateType) {
        this.templateType = templateType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }

    public Integer getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Integer updateUser) {
        this.updateUser = updateUser;
    }

    public Integer getDisabled() {
        return disabled;
    }

    public void setDisabled(Integer disabled) {
        this.disabled = disabled;
    }

    public String getSignName() {
        return signName;
    }

    public void setSignName(String signName) {
        this.signName = signName;
    }


    public Integer getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Integer expireTime) {
        this.expireTime = expireTime;
    }

    public Integer getMaxCount() {
        return maxCount;
    }

    public void setMaxCount(Integer maxCount) {
        this.maxCount = maxCount;
    }
}
